package com.daidai.custom

import android.annotation.SuppressLint
import android.content.Context
import android.util.AttributeSet
import android.view.MotionEvent
import android.widget.TextView
import com.daidai.tools.G

@SuppressLint("AppCompatCustomView")
class MyTextView : TextView{

    constructor(ctx: Context):this(ctx,null){}
    constructor(ctx:Context,attrs:AttributeSet?):this(ctx,attrs,0){}
    constructor(ctx:Context,attrs: AttributeSet?,defStyle:Int):super(ctx,attrs,defStyle){
    }

    override fun onTouchEvent(event: MotionEvent?): Boolean {
        when(event?.action){
            MotionEvent.ACTION_DOWN -> G.elog("touch down called!")
            MotionEvent.ACTION_MOVE -> G.elog("touch move called!")
            MotionEvent.ACTION_UP -> G.elog("touch up called!")
        }
        return true
    }
}